import React from "react";
import ProTypes from "prop-types";

const BottomBtn = (props) => {
    const { text, colorClass, icon, onBtnClick } = props;
    return (
        <button type={"button"} className={`btn w-100 btn-block no-border ${colorClass}`} onClick={onBtnClick}>
            <i className={"bi me-2 " + icon}></i>
            <span>{text}</span>
        </button>
    );
};

BottomBtn.propTypes = {
    text: ProTypes.string,
    colorClass: ProTypes.string,
    icon: ProTypes.string.isRequired,
    onBtnClick: ProTypes.func,
};

BottomBtn.defaultProps = {
    text: "新建",
};

export default BottomBtn;
